package com.varlor.demo02;
//JDK动态代理
public class CarTest {
    public static void main(String[] args) {
        //创建代理模式
        CarSystemProxy carSystemProxy = new CarSystemProxy();
        //调用代理模式getProxy()方法，将返回的invoke转给CarInterfaces
        CarInterfaces proxy = (CarInterfaces) carSystemProxy.getProxy();
        proxy.run();
        proxy.playMusic();
        proxy.stop();
    }
}
